package com.tan00xu.vo;

/**
 * 统一的错误码
 */
public enum ErrorCode {

    /**
     * 参数有误
     */
    PARAMS_ERROR(10001,"参数有误"),
    ACCOUNT_PWD_NOT_EXIST(10002,"用户名或密码不存在"),
    TOKEN_ILLEGAL(10003,"token非法"),
    ACCOUNT_EXIST(10004,"该账户已存在"),

    NO_PERMISSION(70001,"无访问权限"),
    SESSION_TIME_OUT(90001,"会话超时"),
    NO_LOGIN(90002,"未登录或登录超时，请重新登录"),

    REDIS_ERROR(99999,"redis缓存异常"),

    Upload_ERROR(20000,"文件上传失败");
    ;

    private int code;
    private String msg;

    ErrorCode(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}